Service providers (e.g., wireless, cellular, etc.) and device manufacturers are continually challenged to deliver value and convenience to consumers by, for example, providing compelling network services. One popular application involves browsing web pages on the World Wide Web. Currently, many web pages are designed for viewing on large screens with broadband internet connections. Often, these web pages are very large, images do not scale to smaller screen sizes, and are poorly suited for rendering on a device utilizing a small screen and/or having a limited connection. Cascading Style Sheets (CSS) may be utilized on web pages to represent the content on web pages. With CSS, web pages may be rendered and useful on large screen and/or broadband devices as well as smaller screen and/or limited connection devices. However, utilizing CSS on devices may limit a user's experience browsing content over the web in other ways because the CSS is additional information that the device needs to download.
Some Example Embodiments
Therefore, there is a need for an approach for rendering web content utilizing external rendering rules.
According to one embodiment, a method comprises receiving web content associated with a particular rendering rule. The method also comprises rendering the web content according to a default rendering rule. The method further comprises receiving the particular rendering rule. The method additionally comprises determining a viewpoint of the web content. The method further comprises re-rendering the web content according to the particular rendering rule at the viewpoint.
According to another embodiment, an apparatus comprising at least one processor, and at least one memory including computer program code, the at least one memory and the computer program code configured to, with the at least one processor, cause, at least in part, the apparatus to receive web content associated with a particular rendering rule. The apparatus is also caused to render the web content according to a default rendering rule. The apparatus is further caused to receive the particular rendering rule. The apparatus is additionally caused to determine a viewpoint of the web content. The apparatus is further caused to re-render the web content according to the particular rendering rule at the viewpoint.
According to another embodiment, a computer-readable storage medium carrying one or more sequences of one or more instructions which, when executed by one or more processors, cause, at least in part, an apparatus to receive web content associated with a particular rendering rule. The apparatus is also caused to render the web content according to a default rendering rule. The apparatus is further caused to receive the particular rendering rule. The apparatus is additionally caused to determine a viewpoint of the web content. The apparatus is further caused to re-render the web content according to the particular rendering rule at the viewpoint.
According to another embodiment, an apparatus comprises means for receiving web content associated with a particular rendering rule. The apparatus also comprises means for rendering the web content according to a default rendering rule. The apparatus further comprises means for receiving the particular rendering rule. The apparatus additionally comprises means for determining a viewpoint of the web content. The apparatus further comprises means for re-rendering the web content according to the particular rendering rule at the viewpoint.
Still other aspects, features, and advantages of the invention are readily apparent from the following detailed description, simply by illustrating a number of particular embodiments and implementations, including the best mode contemplated for carrying out the invention. The invention is also capable of other and different embodiments, and its several details can be modified in various obvious respects, all without departing from the spirit and scope of the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.